﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GIMS.Exec
{
    /// <summary>
    /// Interface for executing scripts with ImageMagick
    /// </summary>
    public interface IExecutor
    {
        /// <summary>
        /// Executes the given script with ImageMagick and returns the path to the newly created image. 
        /// If ImageMagick returns any message, an Exception will be raised (IMException or IMFileNotFoundException).
        /// </summary>
        /// <param name="program">Program to use, to execute the script.</param>
        /// <param name="script">ImageMagick script without Save-Operator (the method adds a save-Operator to the script)</param>
        /// <returns>Path of the new image.</returns>
        string CreatePreview(string program, string script);

        /// <summary>
        /// Executes the given script with ImageMagick. 
        /// If ImageMagick returns any message, an Exception will be raised (IMException or IMFileNotFoundException). 
        /// </summary>
        /// <param name="program">Program to use, to execute the script.</param>
        /// <param name="script">ImageMagick script</param>
        void ExecuteCommand(string program, string script);
    }
}
